<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>{% block title %}{% endblock %}</title>
  <link rel="stylesheet" href="/static/plugins/boostrap/css/bootstrap.min.css">
  <script src="/static/plugins/juqery/jquery.min.js"></script>
  <script src="/static/plugins/boostrap/js/bootstrap.min.js"></script>
  {% block head %}{% endblock %}
  <style>
      .li-item {
          color: orangered;
      }
  </style>
</head>
<body>
<div class="row clearfix">
  <div class="col-md-12 column">
    <nav class="navbar navbar-default" role="navigation">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse"
                data-target="#bs-example-navbar-collapse-1"><span class="sr-only">Toggle navigation</span><span
            class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
        <a class="navbar-brand" href="#">任务订单外派系统</a>
      </div>

      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
          <li class="active">
            <a href="{% url 'home' %}">首页</a>
          </li>

        </ul>
        <form class="navbar-form navbar-left" action="{% url 'home' %}" role="search" method="post">
          {% csrf_token %}
          <div class="form-group">
            <input type="text" name="keyword" placeholder="输入任务相关信息搜索" class="form-control"/>
          </div>
          <button type="submit" class="btn btn-primary">搜索</button>
        </form>
        <ul class="nav navbar-nav navbar-right">
          {% if request.session.user.username %}
            <li class="li-item">
              <a href="">你好~
                <span class="li-item"
                      style="color: orangered">{{ request.session.user.nickname }}</span></a>
            </li>
            <li class="li-item">
              <a href="{% url 'loginout' %}"> <span style="color: orangered">退出登录</span></a>
            </li>
          {% else %}
            <li class="li-item">
              <a href="{% url 'login' %}"><span class="li-item" style="color: orangered">登录</span></a>
            </li>
            <li class="li-item">
              <a href="{% url 'register' %}"> <span style="color: orangered">注册</span></a>
            </li>
          {% endif %}
          {% if request.session.user.identity == 0 %}

            <li class="li-item">
              <a href="{% url 'myorder' %}"><span class="li-item" style="color: dodgerblue">我的接单</span></a>
            </li>
          {% elif request.session.user.identity == 1 %}
            <li class="li-item">
              <a href="{% url 'addorder' %}"> <span style="color: deepskyblue">发布订单</span></a>
            </li>
          {% endif %}
          <li><a href=""></a></li>
          <li><a href=""></a></li>
          {#          <li>#}
          {#            <a href="#">Link</a>#}
          {#          </li>#}
          {#          <li class="dropdown">#}
          {#            <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown<strong class="caret"></strong></a>#}
          {#            <ul class="dropdown-menu">#}
          {#              <li>#}
          {#                <a href="#">Action</a>#}
          {#              </li>#}
          {#              <li>#}
          {#                <a href="#">Another action</a>#}
          {#              </li>#}
          {#              <li>#}
          {#                <a href="#">Something else here</a>#}
          {#              </li>#}
          {#              <li class="divider">#}
          {#              </li>#}
          {#              <li>#}
          {#                <a href="#">Separated link</a>#}
          {#              </li>#}
          {#            </ul>#}
          {#          </li>#}
        </ul>
      </div>

    </nav>
    <div class="row clearfix">
      <div class="col-md-12 column">
        <div class="row clearfix">
          <div class="col-md-4 column">
            {% block left %}

            {% endblock %}
          </div>
          <div class="col-md-4 column">
            <div style="margin-top: 35px">
              {% block content %}

              {% endblock %}
            </div>

          </div>
          <div class="col-md-4 column">
            {% block right %}

            {% endblock %}
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
</body>
</html>